package step2;

public class JdkProxyClient {
    public static void main(String[] args) {
        //真实对象
        Subject realSubject = new RealSubject();

        MyInvocationHandler myInvocationHandler = new MyInvocationHandler();
        Subject proxySubject = (Subject) myInvocationHandler.bind(realSubject);

        proxySubject.speak();
        System.out.println();
        proxySubject.read("茶馆（老舍）");
        System.out.println();
       proxySubject.sellBooks();

    }
}
